1. Field of the Invention
The present invention relates to a storage system for processing, via a cache memory, input and output requests from an upper system to a storage device, and a control method and program thereof, and particularly relates to a storage system for writing back latest data that has been updated in a cache memory to a storage device, and a control method and program thereof.
2. Description of the Related Arts
Conventionally, in a RAID device for processing input and output requests from a host, a cache memory is provided in a control module, and input and output requests from the host are processed in the cache memory. Cache data of such RAID device is managed in a page unit. As shown in FIG. 1, a cache page 100 is managed in a manner that, for example, one page consists of 66,560 bytes. The cache page 100 comprises plurality pieces of user data provided in block units each of which serving as an access unit of a host, wherein one block user data is 512 bytes, an 8-byte block check code (BCC) is added to every 512 bytes, and a unit comprising 128 blocks of the 520-byte block is managed as one page, therefore, one page is 520×128=66,560 bytes. Also, a cache management table called a cache bundle element CBE is prepared for managing cache pages. In the cache management table, a management record corresponding to each page is provided, and the management record has, for example, a logical unit number LUN, a logical block address LBA, a dirty data bitmap 104 of FIG. 2B representing dirty data wherein one block corresponds to one bit, and a present data bitmap 102 of FIG. 2A representing presence of present data wherein one block corresponds to one bit in the same manner. One page of the cache management table corresponds to a size that corresponding to, in a ratio one to one, a strip of the disk device constituting a RAID group. In cache control of a RAID device, when a write is requested from a host, a cache page is assigned in a required quantity. However, write data is not always present in the entirety of one page. Therefore, with respect to the block updated in a write process within the page, a corresponding bit in the dirty date bitmap is set to bit 1, so as to manage presence of dirty data. Moreover, in a conventional cache control, when a free area in a cache memory is deficient, or when old cache data is to be removed by means of an LRU algorithm, a write-back process for writing back the dirty data, which is present in the page, to a disk device is performed.
However, in such conventional cache control process, when the dirty data present in a page is to be written back to the disk device, only the blocks represented by bit 1 which are managed in the dirty data bitmap are subjected to a write to the disk device. Therefore, when blocks of the dirty data are incontinuously present in the page, a write command is issued for each continuous area represented by a group of bits 1, so as to write it to the disk device. As a result, time for processing a command with respect to the disk device is elongated, thereby causing a problem that the performance is deteriorated.
According to the present invention, there are provide a storage system for suppressing the number of write-back command issue to a minimum level even when dirty data is incontinuously present in a page, thereby reducing write-back process time, and a control method and program thereof.